FROM java:8

VOLUME /data/log/

ADD target/leancloud-proxy-0.0.1.jar /work/leancloud-proxy-0.0.1.jar
ADD target/classes/application.properties /work/application.properties
ADD target/classes/application-dev.properties /work/application-dev.properties
ADD target/classes/application-test.properties /work/application-test.properties
ADD target/classes/application-prod.properties /work/application-prod.properties
ADD restart.sh /work/restart.sh
ADD status.sh /work/status.sh
ADD README.md /work/README.md

RUN bash -c 'touch /work/leancloud-proxy-0.0.1.jar'
RUN bash -c 'mkdir -p /data/log'

WORKDIR /work
# ENTRYPOINT ['java', '-jar', 'leancloud-proxy-0.0.1.jar', '-Xms512m', '-Xmx512m']
ENTRYPOINT ["java", "-Djava.security.egd=file:/dev/./urandom", "-server", "-jar", "leancloud-proxy-0.0.1.jar"]
